#ifndef __PANIC_H__
#define __PANIC_H__

#include <common.h>
#include <isr.h>

extern void panic(const char *message, const char *file, u32int line);
extern void panic_assert(const char *file, u32int line, const char *desc);
extern void panic_registers(const char *message, const char *file, u32int line, registers_t *regs);

#define PANIC(msg) panic(msg, __FILE__, __LINE__);
#define PANIC_REGISTERS(msg, regs) panic_registers(msg, __FILE__, __LINE__, regs);
#define ASSERT(b) ((b) ? (void)0 : panic_assert(__FILE__, __LINE__, #b))

#endif